package com.itheima.vip04;
//多个对象指向相同
public class Test {
    public static void main(String[] args) {

        Student s1 = new Student();
        s1.name = "林青霞";
        s1.age = 30;
        System.out.println(s1.name + "," + s1.age);


        Student s2 = s1;//把第1个对象的地址赋值给第2个对象
        s2.name = "张曼玉";
        s2.age = 28;
        System.out.println(s1.name + "," + s1.age);
        System.out.println(s2.name + "," + s2.age);
    }
}
